﻿<!-- Views/Shared/_PartialSidebar.cshtml -->
<aside class="collapse d-md-block bg-light shadow-sm" id="sidebar" style="width: 220px; min-height: calc(100vh - 56px);">
    <nav class="flex-column p-3">
        <ul class="nav flex-column">
            <!-- 首页 -->
            <li class="nav-item">
                <a class="nav-link"
                   href="javascript:;"
                   data-url="@Url.Action("Index", "Home")"
                   data-menu-id="home">
                    首页
                </a>
            </li>

            <!-- 货品管理（子菜单，已改造） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#goodsManage"
                   role="button"
                   aria-expanded="false">
                    货品管理
                    <i class="bi bi-chevron-left arrow-icon"></i>
                </a>
                <div class="collapse ms-3" id="goodsManage">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "Goods")"
                               data-menu-id="goods-index">
                                货品信息
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("GoodsType", "Goods")"
                               data-menu-id="goods-type">
                                货品类型
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 出入库管理（子菜单，重点改造） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#stockManage"
                   role="button"
                   aria-expanded="false">
                    出入库管理
                    <i class="bi bi-chevron-left arrow-icon"></i>
                </a>
                <div class="collapse ms-3" id="stockManage">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockIn", "Stock")"
                               data-menu-id="stock-in">
                                入库管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockOut", "Stock")"
                               data-menu-id="stock-out">
                                出库管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockCheck", "Stock")"
                               data-menu-id="stock-check">
                                库存盘点
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockTransfer", "Stock")"
                               data-menu-id="stock-transfer">
                                库存调拨
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 订单管理（子菜单，改造） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#orderMange"
                   role="button"
                   aria-expanded="false">
                    订单管理
                    <i class="bi bi-chevron-left arrow-icon"></i>
                </a>
                <div class="collapse ms-3" id="orderMange">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("PurchaseOrder", "Order")"
                               data-menu-id="order-purchase">
                                进货订单
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("PurchaseReturn", "Order")"
                               data-menu-id="order-purchase-return">
                                进货退货
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("SalesOrder", "Order")"
                               data-menu-id="order-sales">
                                销售订单
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("SalesReturn", "Order")"
                               data-menu-id="order-sales-return">
                                销售退货
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("PurchaseStats", "Order")"
                               data-menu-id="order-purchase-stats">
                                进货统计
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("SalesStats", "Order")"
                               data-menu-id="order-sales-stats">
                                销售统计
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 往来单位（子菜单，已改造） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#businessContacts"
                   role="button"
                   aria-expanded="false">
                    往来单位
                    <i class="bi bi-chevron-left arrow-icon"></i>
                </a>
                <div class="collapse ms-3" id="businessContacts">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "Supplier")"
                               data-menu-id="goods-index">
                                供应商管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "CustomerManagement")"
                               data-menu-id="goods-type">
                                客户管理
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 统计报表（子菜单，改造） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#statisticalReport"
                   role="button"
                   aria-expanded="false">
                    统计报表
                    <i class="bi bi-chevron-left arrow-icon"></i>
                </a>
                <div class="collapse ms-3" id="statisticalReport">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("PurchaseOrder", "Order")"
                               data-menu-id="order-purchase">
                                出入库流水
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("PurchaseReturn", "Order")"
                               data-menu-id="order-purchase-return">
                                入库流水
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("SalesOrder", "Order")"
                               data-menu-id="order-sales">
                                出库流水
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("SalesReturn", "Order")"
                               data-menu-id="order-sales-return">
                                盘点统计
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("PurchaseStats", "Order")"
                               data-menu-id="order-purchase-stats">
                                调拨统计
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("SalesStats", "Order")"
                               data-menu-id="order-sales-stats">
                                库存分布
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("SalesStats", "Order")"
                               data-menu-id="order-sales-stats">
                                库存汇总
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("SalesStats", "Order")"
                               data-menu-id="order-sales-stats">
                                出入库类型汇总
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 台账（子菜单，重点改造） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#ledger"
                   role="button"
                   aria-expanded="false">
                    台账
                    <i class="bi bi-chevron-left arrow-icon"></i>
                </a>
                <div class="collapse ms-3" id="ledger">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockIn", "Stock")"
                               data-menu-id="stock-in">
                                库存查询
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockOut", "Stock")"
                               data-menu-id="stock-out">
                                保质期查询
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockCheck", "Stock")"
                               data-menu-id="stock-check">
                                批次查询
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockTransfer", "Stock")"
                               data-menu-id="stock-transfer">
                                库存预警
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 仓库管理（改造） -->
            <li class="nav-item">
                <a class="nav-link"
                   href="javascript:;"
                   data-url="@Url.Action("Index", "Warehouse")"
                   data-menu-id="warehouse">
                    仓库管理
                </a>
            </li>

            <!-- 系统消息（改造） -->
            <li class="nav-item">
                <a class="nav-link"
                   href="javascript:;"
                   data-url="@Url.Action("Index", "Message")"
                   data-menu-id="message">
                    系统消息
                </a>
            </li>

            <!-- 台账（子菜单，重点改造） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#organizationalManagement"
                   role="button"
                   aria-expanded="false">
                    组织管理
                    <i class="bi bi-chevron-left arrow-icon"></i>
                </a>
                <div class="collapse ms-3" id="organizationalManagement">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockIn", "Stock")"
                               data-menu-id="stock-in">
                                组织机构
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockOut", "Stock")"
                               data-menu-id="stock-out">
                                岗位管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockCheck", "Stock")"
                               data-menu-id="stock-check">
                                用户管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("StockTransfer", "Stock")"
                               data-menu-id="stock-transfer">
                                角色管理
                            </a>
                        </li>
                    </ul>
                </div>
            </li>

            <!-- 系统设置（含子菜单） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#systemSettings"
                   role="button"
                   aria-expanded="false">
                    系统设置
                    <i class="bi bi-chevron-left arrow-icon"></i>
                </a>
                <div class="collapse ms-3" id="systemSettings">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "NumberingRule")"
                               data-menu-id="order-purchase">
                                编号规则
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("PurchaseReturn", "Order")"
                               data-menu-id="order-purchase-return">
                                系统字段
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("SalesOrder", "Order")"
                               data-menu-id="order-sales">
                                单位管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("SalesReturn", "Order")"
                               data-menu-id="order-sales-return">
                                审核设置
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("PurchaseStats", "Order")"
                               data-menu-id="order-purchase-stats">
                                库存设置
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("SalesStats", "Order")"
                               data-menu-id="order-sales-stats">
                                出入库类型
                            </a>
                        </li>
                    </ul>
                </div>
            </li>
            <!-- 个人设置（含子菜单） -->
            <li class="nav-item">
                <a class="nav-link d-flex align-items-center collapsed"
                   data-bs-toggle="collapse"
                   href="#personalProfile"
                   role="button"
                   aria-expanded="false">
                    个人设置
                    <i class="bi bi-chevron-left arrow-icon"></i>
                </a>
                <div class="collapse ms-3" id="personalProfile">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link"
                               href="javascript:;"
                               data-url="@Url.Action("Index", "Goods")"
                               data-menu-id="goods-index">
                                个人资料
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" 
                               href="javascript:;"
                               data-url="@Url.Action("GoodsType", "Goods")"
                               data-menu-id="goods-type">
                                修改密码
                            </a>
                        </li>
                    </ul>
                </div>
            </li>
        </ul>
    </nav>
</aside>